package com.inspector.app.di.network.api

import android.os.Parcelable
import androidx.annotation.Keep
import com.example.commen.net.easyHttp.server.ReleaseServer
import com.hjq.http.config.IRequestApi
import kotlinx.parcelize.Parcelize

/**
 * 获取菜单树
 */
class MenuTreeApi : ReleaseServer(), IRequestApi {
    override fun getApi(): String {
        return "/permission/menu/app/getMenuTree"
    }

    data class MenuTrueInfoData(
        var alias: String = "",
        var children: ArrayList<MenuTrueChildren> = arrayListOf(),
        var component: String = "",
        var icon: String = "",
        var id: Int = 0,
        var name: String = "",
        var parentId: Int = 0,
        var path: String = "",
        var showType: Int = 0,
        var sort: String = "",
        var type: String = ""
    )

    data class MenuTrueChildren(
        var alias: String = "",
        var children: List<MenuTrueChildren2> = arrayListOf(),
        var component: String = "",
        var icon: String = "",
        var id: Int = 0,
        var name: String = "",
        var parentId: Int = 0,
        var path: String = "",
        var showType: Int = 0,
        var sort: String = "",
        var type: String = "",
        var tips: String = ""//其他地方设置字段
    )
    @Keep
    @Parcelize
    data class MenuTrueChildren2(
        var alias: String = "",
        var children: MutableList<MenuTrueChildren3> = mutableListOf(),
        var component: String = "",
        var icon: String = "",
        var id: Int = 0,
        var name: String = "",
        var parentId: Int = 0,
        var path: String = "",
        var showType: Int = 0,
        var sort: String = "",
        var type: String = "",
        var tips: String = ""//其他地方设置字段
    ): Parcelable
    @Keep
    @Parcelize
    data class MenuTrueChildren3(
        var alias: String = "",
        var children: MutableList<String> = mutableListOf(),
        var component: String = "",
        var icon: String = "",
        var id: Int = 0,
        var name: String = "",
        var parentId: Int = 0,
        var path: String = "",
        var showType: Int = 0,
        var sort: String = "",
        var type: String = "",
        var tips: String = ""//其他地方设置字段
    ):Parcelable
}